#ifndef LAURIN_80211_NETWORK_H_
#define LAURIN_80211_NETWORK_H_


#include "laurin-80211-station.h"
#include "laurin-80211-access-point.h"
#include <sys/types.h>
#include <glibmm/ustring.h>
#include <list>


class Laurin80211Network
{

	public:

		Laurin80211Network(Glib::ustring ssid);
		virtual ~Laurin80211Network();


		/**
		 * Search if an ap or a station with the given mac is present.
		 */
		Laurin80211Station* isDevicePresent(u_int8_t* mac);
		Laurin80211Station* isStationPresent(u_int8_t* mac);
		Laurin80211AccessPoint* isAccessPointPresent(Glib::ustring bssid);

		/**
		 * Check if an access point is present by checking its mac address.
		 * It checks also with  previous mac of the given one (if a internal adapter is present...)
		 */
		Laurin80211AccessPoint* isAccessPointPresent(u_int8_t* bssid);


		/**
		 * Add only user station, not access points
		 */
		bool addStation(const Laurin80211Station& station, bool check = true);
		bool addAccessPoint(const Laurin80211AccessPoint& accessPoint, bool check = true);


		Glib::ustring getSSID() const;
		std::list<Laurin80211AccessPoint>* getAccessPoints();
		std::list<Laurin80211Station>* getStations();


		void setDistanceBetweenMonitorAndAP(Glib::ustring bssid, double distance);

	private:

		Glib::ustring _ssid;
		std::list<Laurin80211AccessPoint> _access_points;
		std::list<Laurin80211Station> _stations;

};

#endif
